<?php
/**
 * Add our manual submission button to the sitemap edit page.
 * 
 */

class Mageex_AdvanceSeo_Block_Sitemap_Edit extends Mage_Adminhtml_Block_Sitemap_Edit
{
 	public function __construct()
    { 	
    	parent::__construct(); 	
    	// Only put the button here if the extension is enabled
    	if (Mage::helper('advanceseo/sitemap')->isEnabled()) { 		
	    	$params = array("sitemap_id" => Mage::registry('sitemap_sitemap')->getId());
	    	$url = Mage::helper('adminhtml')->getUrl("advanceseo/sitemap/", $params);
	    	 $this->_addButton('submit', array(
	            'label'   => Mage::helper('adminhtml')->__('Submit Sitemap'),
	            'onclick' => "window.location.href='".$url."'",
	            'class'   => 'add',
	        ));	
    	}
    }
}